package com.cn.auth.dao.sys;

import java.util.List;
import com.cn.auth.po.sys.AuthLog;
import com.cn.auth.po.sys.AuthUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 数据关联DAO
 *
 * @author Maochao-zhu
 */
@Mapper
public interface UserDao {
    public Integer insertUser(AuthUser user);

    public Integer deleteUserById(String[] ids);

    public Integer updateUserById(AuthUser user);

    public AuthUser getUserById(Integer id);
    public AuthUser getUserByLogin(String uname);

    public List<AuthUser> getUserList(AuthUser user);

    public Integer getUserListCount(AuthUser user);

    public Integer getUserByLoginName(@Param("uname") String uname, @Param("id") Integer id);

    public List<AuthUser> checkUserLogin(@Param("uname") String username, @Param("pwd") String password);

    /**
     * 获取日志列表
     *
     * @param log
     * @return
     */
    public List<AuthLog> getLogList(AuthLog log);

    public Integer getLogListCount(AuthLog log);

    public Integer deleteLog(String[] ids);

    public Integer insertLog(AuthLog log);

    public List<AuthUser> getUserByBranchId(@Param("branchId") Integer branchId);

    public Integer getUserNextMaxOrderBy();
}
